<div class="row-fluid">
    <div class="navbar no-margin">
        <div class="navbar-inner">
            <ul class="breadcrumb">
                <i class="icon-chevron-left hide-sidebar"><a href='#' title="Hide Sidebar" rel='tooltip'>&nbsp;</a></i>
                <i class="icon-chevron-right show-sidebar" style="display:none;"><a href='#' title="Show Sidebar"
                                                                                    rel='tooltip'>&nbsp;</a></i>
                <li>
                    <a href="#/onduty">首页</a>
                </li>
                <li>
                    <a href="#/star/onduty/ticket_list/rg/0">工单列表</a>
                </li>
                <li class="active">工单处理</li>
            </ul>
        </div>
    </div>
</div>

<style type="text/css">
    table tr td{
        border: none;
    }
</style>

<div class="container-fluid">

    <div class="row">
        <div class="col-sm-12 col-md-12 main">

            <div class="col-sm-6 col-md-6">
                <h4 class="sub-header" style="margin: 0 5px 5px">工单处理</h4>
                <table id="tbl2" border=0 width="90%" frame=void>
                    <tr>
                        <td colspan="6" style="padding: 5px 5px 0;">
                            <div><label><u>修改指派，可以交付给他人处理</u></label></div>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="6">
                            <div>
                                <div>
                                    <div class="form-group">
                                        <div style="padding: 10px 0px 5px">当前处理人：{{vm.result.data.responser}}
                                            <a ng-click="vm.d.newResponserShow = !vm.d.newResponserShow" style="float:right; cursor:default;"><u>转交</u></a>
                                        </div>
                                        <div ng-show="vm.d.newResponserShow">
                                            <input class="form-control" type="text" name="responser" ng-model="vm.d.responser" sytle="width:80%;display:inline;"/>
                                            <input class="btn btn-primary" type="submit" value="确定" ng-click="toResponser()" style="float:right;"/>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="6">
                            <div style="padding: 0 0 5px">工单状态： </div>
                            <select class="form-control"
                                    ng-model="vm.result.data.status"
                                    ng-init="vm.result.data.status='opened'"
                                    ng-change="dealTicket()">
                                <option value="opened">待处理</option>
                                <option value="processing">处理中</option>
                                <option value="resolved">待验证</option>
                                <option value="invalid">已废除</option>
                                <option value="closed">已关闭</option>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="6">
                            <label style="padding: 0 0 5px">处理说明（标签）</label>
                            <textarea style="height: 80px" class="form-control" name="note" ng-model="vm.p.note" > </textarea>
                            <div style="float: right; padding: 10px 0 10px; ">
                                <input class="btn btn-primary" type="submit" value="发布" ng-click="addRemarks()"/>
                            </div>
                        </td>
                    </tr>

                </table>

                <h4 class="sub-header" style="margin: 0 5px 5px">变更记录</h4>
                <table id="tbl" border=0 width="90%" frame=void>

                    <tr>
                        <td colspan="6">
                            <div ng-repeat="n in vm.p.notes" style="padding: 10px 10px 10px">
                                {{n.datetime}} <br/>
                                {{n.user}}: {{n.content}}
                            </div>
                        </td>
                    </tr>
                </table>
            </div>
            <div class="col-sm-6 col-md-6">
                <h4 class="sub-header" style="margin: 0 5px 5px">工单信息</h4>
                <table id="tbl1" border=0 width="90%" frame=void>
                    <tr>
                        <td width="100px" colspan="3">工单编号：{{vm.result.data.ticketId}}</td>
                    </tr>
                    <tr>
                        <td width="100px" colspan="3">工单标题：{{vm.result.data.subject}}</td>
                    </tr>
                    <tr>
                        <td width="100px" colspan="2">工单类型：{{vm.p.type}}</td>
                    </tr>
                    <tr>
                        <td width="100px" colspan="2">工单分类：{{vm.p.category}}</td>
                    </tr>
                    <tr>
                        <!--  [critical-严重的, urgent-紧急的, high-高的, normal-一般的, low-低的]-->
                        <td width="100px" colspan="2">
                            <font color="red">*</font>紧急程度：{{vm.p.severity}} </td>
                    </tr>

                    <tr>
                        <td width="100px" colspan="3">
                            <font color="red">*</font>支持组：
                            <a href="#/star/onduty/resolvegroup_add/code/{{vm.result.data.resolvegroupId}}" target="_blank">{{vm.result.data.resolvegroupId}}</a>
                        </td>
                    </tr>
                    <tr>
                        <td width="100px" colspan="3">
                            <font color="red">*</font>支持项：
                            <a href="#/star/onduty/cti_add/id/{{vm.result.data.ctiId}}" target="_blank">{{vm.result.data.ctiId}}</a>
                        </td>
                    </tr>
                    <tr>
                        <td width="100px" colspan="3">
                            <font color="red">*</font>上报来源：
                            <a href="#/star/onduty/agent_add/agent_id/{{vm.result.data.requester}}" target="_blank">{{vm.result.data.requester}}</a>
                        </td>
                    </tr>

                    <tr>
                        <td width="100px" colspan="2">通知范围：Admin（{{vm.result.data.isNotifyAdmin}}）,所有成员（{{vm.result.data.isNotifyRg}}）</td>
                    </tr>
                    <tr>
                        <td colspan="6">
                            工单详情:
                            <div style="margin: 5px 12px 5px;">
                                {{vm.result.data.description}}
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="6">
                            工单备注:
                            <div style="margin: 5px 12px 5px;">
                                {{vm.result.data.noteReason}}
                            </div>
                        </td>
                    </tr>

                </table>
            </div>

        </div>
    </div>
</div><!--/.container-->
